package io.github.yotta.logger.message.consumer;

import com.google.common.eventbus.Subscribe;
import io.github.yotta.logger.message.model.LogOperationDataMessage;
import io.github.yotta.logger.message.support.LogSaveProvider;

/**
 * @author yotta
 * @date 2023/3/22 19:34
 */
public class EventBusLogDataConsumer extends AbstractLogDataConsumer {

    public EventBusLogDataConsumer(LogSaveProvider logSaveProvider) {
        super(logSaveProvider);
    }


    @Subscribe
    public void subscribe(LogOperationDataMessage logOperationData) {
        super.writeToDb(logOperationData);
    }
}
